package com.shadowtorcher.stdisk.bean;

import com.shadowtorcher.soulknife.DataSupport;
import com.shadowtorcher.soulknife.exception.BeanConfigErrorException;
import com.shadowtorcher.stdisk.util.StaticUtils;

import java.io.Serializable;
import java.sql.SQLException;

public class UserBean extends DataSupport implements Serializable {
    private String UserID; // 主键
    private String UserName;
    private String Password;
    private String PermissionID; // 外键
    private long UsedSpace;

    @Override
    public void save() throws BeanConfigErrorException, SQLException {
        if (this.UserID == null)
            this.UserID = StaticUtils.generatorStringUUID();
        super.save();
    }

    public String getUserID() {
        return UserID;
    }

    public void setUserID(String userID) {
        UserID = userID;
    }

    public String getUserName() {
        return UserName;
    }

    public void setUserName(String userName) {
        UserName = userName;
    }

    public String getPassword() {
        return Password;
    }

    public void setPassword(String password) {
        Password = password;
    }

    public String getPermissionID() {
        return PermissionID;
    }

    public void setPermissionID(String permissionID) {
        PermissionID = permissionID;
    }

    public long getUsedSpace() {
        return UsedSpace;
    }

    public void setUsedSpace(long usedSpace) {
        UsedSpace = usedSpace;
    }
}
